﻿define([
        'services/dataservice', 'utils', 'config','common.consts'
       ]
  ,function (DataService, utils, config, consts) {
  var thisObj = new DataService();
  thisObj.getLocalData = function (param) {
      return 'product-category.json';
  };  
  thisObj.getRequestUrl = function() {
		var self = this;
		var url = '';
		if (config.runMode === 'PRO') {
			url += consts.API_PATH.PRO_PRODUCT_ACTIONS;

			if (self.method === 'GET') {
				url += "?request={request}";
			}
		} else {
			url += consts.API_PATH.DEV;
			url += '{request}';
		}

		return url;
	}; 
  thisObj.init("getcabinetcategories");
  var getProductCategories = function (callbacks, param) {
      var fn;
      fns = {
          success: function (data) {
              callbacks.success(data.cabinetcategories);
          },
          error: callbacks.error
      };
      thisObj.sendRequest(fns, param);
  };
  return {
      getProductCategories: getProductCategories
  };
}); 